<template>
  <div>
    <el-dialog
      title="提现风险审查"
      :visible.sync="dialogVisible"
      @close="dialogFormVisible"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      width="80%"
    >
      <div class="el-dialog-div">
        <div>
        <el-tabs v-model="current" @tab-click="handleClick">
          <el-tab-pane name="1" label="店铺"></el-tab-pane>
          <el-tab-pane name="5" label="钱包"></el-tab-pane>
          <el-tab-pane name="2" label="订单"></el-tab-pane>
          <el-tab-pane name="3" label="结算"></el-tab-pane>
          <el-tab-pane name="4" label="提现"></el-tab-pane>
        </el-tabs>
      </div>
      <div>
        <!--店铺信息-->
        <Supplier v-if="current == 1" :shopId="shopId"></Supplier>
         <!--钱包-->
         <Wallet v-if="current == 5" :shopId="shopId"></Wallet>
        <!--订单信息-->
        <Order v-if="current == 2" :shopId="shopId"></Order>
        <!-- 结算信息 -->
        <Settled v-if="current == 3" :shopId="shopId"></Settled>
        <!--提现信息-->
        <History v-if="current == 4" :shopId="shopId"></History>
      </div>
      
      </div>
    </el-dialog>
  </div>
</template>

<script>
import Supplier from "./supplier";
import Order from "./order";
import Settled from "./settled";
import History from "./history";
import Wallet from "./wallet";
import { formatDate } from "@/utils/DateTime.js";
export default {
  components: {
    Supplier,
    Order,
    Settled,
    History,
    Wallet
  },
  data() {
    return {
      current: 1,
      /*左边长度*/
      formLabelWidth: "120px",
      /*是否显示*/
      dialogVisible: false,
      applyTime: "",
    };
  },
  props: ["open", "form"],
  watch: {
    open: function (n, o) {
      this.dialogVisible = this.open;
    },
  },
  computed: {
    shopId() {
      return this.form.shop_supplier_id;
    },
  },
  created() {
    this.applyTime = formatDate(new Date(), "yyyy年MM月dd日hh:mm");
  },
  methods: {
    // 打印
    async printRow(row) {
      this.$nextTick(() => {
        this.$refs.listPrint.print();
      });
    },
    /*关闭弹窗*/
    dialogFormVisible(e) {
      this.$emit("close");
    },
    handleClick(e){
      console.log(e);
    }
  },
};
</script>

<style lang="scss" scoped>
.el-dialog-div {
  max-height: 80vh !important;
  overflow: auto;
  padding: 0 !important;
  margin: 0 !important;
}
</style>
